package com.ticket.sass.common.printer.dto;

import com.google.gson.annotations.SerializedName;

import java.io.Serializable;

/**
 * @author ywb
 * @date 2024-06-09 17:12
 */

public class AccessTokenResult implements Serializable {
    
    private String error;
    @SerializedName("error_description")
    private String errorDescription;
    private Body body;
    
    public AccessTokenResult(String error, String errorDescription, Body body) {
        this.error = error;
        this.errorDescription = errorDescription;
        this.body = body;
    }
    
    public String getError() {
        return error;
    }
    
    public void setError(String error) {
        this.error = error;
    }
    
    public String getErrorDescription() {
        return errorDescription;
    }
    
    public void setErrorDescription(String errorDescription) {
        this.errorDescription = errorDescription;
    }
    
    public Body getBody() {
        return body;
    }
    
    public void setBody(Body body) {
        this.body = body;
    }
    
    public static class Body implements Serializable {
        
        @SerializedName("access_token")
        private String accessToken;
        @SerializedName("refresh_token")
        private String refreshToken;
        @SerializedName("machine_code")
        private String machineCode;
        @SerializedName("expires_in")
        private int expiresIn;
        private String scope;
        
        public Body(String accessToken, String refreshToken, String machineCode, int expiresIn, String scope) {
            this.accessToken = accessToken;
            this.refreshToken = refreshToken;
            this.machineCode = machineCode;
            this.expiresIn = expiresIn;
            this.scope = scope;
        }
        
        public String getAccessToken() {
            return accessToken;
        }
        
        public void setAccessToken(String accessToken) {
            this.accessToken = accessToken;
        }
        
        public String getRefreshToken() {
            return refreshToken;
        }
        
        public void setRefreshToken(String refreshToken) {
            this.refreshToken = refreshToken;
        }
        
        public String getMachineCode() {
            return machineCode;
        }
        
        public void setMachineCode(String machineCode) {
            this.machineCode = machineCode;
        }
        
        public int getExpiresIn() {
            return expiresIn;
        }
        
        public void setExpiresIn(int expiresIn) {
            this.expiresIn = expiresIn;
        }
        
        public String getScope() {
            return scope;
        }
        
        public void setScope(String scope) {
            this.scope = scope;
        }
    }
}